<div class="page-header">
    <h1>
        Detail Konfirmasi Pembayaran
        <small>
            <i class="icon-double-angle-right"></i>
            Konfirmasi Pembayaran Agent
        </small>
    </h1>
</div>

<?php
if ($this->msg != "") {
    ?>
    <div class="alert alert-info">
        <button type="button" class="close" data-dismiss="alert">
            <i class="icon-remove"></i>
        </button>

        <strong>
            <i class="icon-ok"></i>
        </strong>

        <?php echo $this->msg; ?>
        <br />
    </div>
    <?php
}
if ($this->errmsg) {
    ?>
    <div class="alert alert-danger">
        <button type="button" class="close" data-dismiss="alert">
            <i class="icon-remove"></i>
        </button>

        <strong>
            <i class="icon-remove"></i>

        </strong>

        <?php echo $this->errmsg; ?>
        <br />
    </div>
<?php
}

if ($this->msg == "") {

    ?>

    <div class="row">
        <div class="col-xs-11">
            <form id="formAdd" class="form-horizontal" role="form" action="" method="post">
                
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="kodeTrans"> Kode Transaksi </label>

                    <div class="col-sm-9">
                            <input type="hidden" id="transId" name="transId" value="<?php if (isset($this->data['transId'])) { echo $this->data['transId']; } ?>"/>
                            <input type="text" id="kodeTrans" name="kodeTrans" class="col-xs-10 col-sm-5" value="<?php if (isset( $this->data['trans_code'] )) { echo $this->data['trans_code'];} ?>" readonly />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="totalTrans"> Total Transkasi </label>
                    <div class="col-sm-9">
                        <input type="text" id="totalTrans" name="totalTrans" class="col-xs-10 col-sm-5" value="<?php if (isset( $this->data['amount1'] )) { echo $this->data['amount1'];} ?>" readonly />
                </div>

            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="tglBayar"> Tanggal Pembayaran </label>

                <div class="col-sm-9">
                    
                    <input class="col-xs-10 col-sm-5" id="tglBayar" name="tglBayar" type="text" value="<?php if (isset( $this->data['pay_date'] )) { echo $this->data['pay_date'];} ?>" readonly />
        
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="caraBayar"> Cara Pembayaran </label>

                <div class="col-sm-9">
                    <input class="col-xs-10 col-sm-5" id="caraBayar" name="caraBayar" type="text" value="<?php if (isset( $this->data['pay_method'] )) { echo $this->data['pay_method'];} ?>" readonly />
                </div>
            </div>
                <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="rekAsal"> Dari Rekening </label>

                <div class="col-sm-9">
                    <textarea class="col-sm-5" id="rekAsal" name="rekAsal" readonly><?php if (isset( $this->data['from_account'] )) { echo $this->data['from_account'];} ?></textarea>
                </div>
            </div>
                <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="rekTujuan"> Rekening Tujuan </label>

                <div class="col-sm-9">
                    <textarea class="col-sm-5" readonly><?php if (isset( $this->data['to_account'] )) { echo $this->data['to_account'];} ?></textarea>
                    
                </div>
            </div>
                <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="jmlTransfer"> Jumlah Transfer </label>

                <div class="col-sm-9">
                    <input type="text" id="jmlTransfer" name="jmlTransfer" placeholder="Tanpa titik/koma (cth: 150000)" class="col-xs-10 col-sm-5" value="<?php if (isset( $this->data['transfer_amount'] )) { echo $this->data['transfer_amount'];} ?>" readonly />
                </div>
            </div>
            <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="ket"> Keterangan </label>

                    <div class="col-sm-9">
                        <textarea class="col-sm-5" id="ket" name="ket" readonly><?php if (isset( $this->data['notes'] )) { echo $this->data['notes'];} ?></textarea>
                    </div>
                </div>
            <div class="clearfix form-actions">
                <div class="col-md-offset-3 col-md-9">
                    <input type="hidden" name="confirmId" value="<?php echo $this->confirmId;?>">
                    <button class="btn btn-info" type="submit">
                        <i class="icon-ok bigger-110"></i>
                        Verifikasi
                    </button>

                    &nbsp; &nbsp; &nbsp;
                    <button class="btn" type="button" onclick="javascript: history.back()">
                        <i class="icon-undo bigger-110"></i>
                        Kembali
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>

<script>


$("select#caraBayar").change(function(){
     var pay = $("#caraBayar").val();
     if (pay == 4){ //Transfer/setoran Tunai

         document.getElementById("rekAsal").disabled = true;
         
     }else{
        document.getElementById("rekAsal").disabled = false;
     }
  });

</script>
<?php } ?>